package scsc.pub.data;

import java.io.Serializable;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;


/** @author Hibernate CodeGenerator */
public class ConsultPK implements Serializable {

    /** identifier field */
    private Integer bulletinId;

    /** identifier field */
    private String operatorId;

    /** full constructor */
    public ConsultPK(Integer bulletinId, String operatorId) {
        this.bulletinId = bulletinId;
        this.operatorId = operatorId;
    }

    /** default constructor */
    public ConsultPK() {
    }

    /** 
     *                @hibernate.property
     *                 column="BulletinID"
     *                 length="10"
     *             
     */
    public Integer getBulletinId() {
        return this.bulletinId;
    }

    public void setBulletinId(Integer bulletinId) {
        this.bulletinId = bulletinId;
    }

    /** 
     *                @hibernate.property
     *                 column="OperatorID"
     *                 length="7"
     *             
     */
    public String getOperatorId() {
        return this.operatorId;
    }

    public void setOperatorId(String operatorId) {
        this.operatorId = operatorId;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("bulletinId", getBulletinId())
            .append("operatorId", getOperatorId())
            .toString();
    }

    public boolean equals(Object other) {
        if ( (this == other ) ) return true;
        if ( !(other instanceof ConsultPK) ) return false;
        ConsultPK castOther = (ConsultPK) other;
        return new EqualsBuilder()
            .append(this.getBulletinId(), castOther.getBulletinId())
            .append(this.getOperatorId(), castOther.getOperatorId())
            .isEquals();
    }

    public int hashCode() {
        return new HashCodeBuilder()
            .append(getBulletinId())
            .append(getOperatorId())
            .toHashCode();
    }

}
